int inputPin = A0;
int LEDPin = 13;

void setup()
{
   pinMode(LEDPin,OUTPUT);
   pinMode(inputPin,INPUT); 
}

void loop()
{
  int reading = analogRead(inputPin);
  int sensorreading = map(reading,0,1023,0,5); 
  int delaytime = map(sensorreading,0,5,0,2000);
  digitalWrite(LEDPin,HIGH);
  delay(delaytime);
  digitalWrite(LEDPin,LOW);
  delay(delaytime);
}
